import { Log } from "../../../../../../../Core/Module/Log/Log";
import { ConsoleHandlerAttribute } from "../../../../../../../Decorator/Decorator";
import { ETTask } from "../../../../../../../Support/Share/Lib/Async/ETTask";
import { ConsoleMode } from "../../../../../../Model/Share/Module/Console/ConsoleComponent";
import { IConsoleHandler } from "../../../../../../Model/Share/Module/Console/IConsoleHandler";
import { ModeContex } from "../../../../../../Model/Share/Module/Console/ModeContex";

@ConsoleHandlerAttribute(ConsoleMode.CreateRobot)
export class CreateRobotConsoleHandler extends IConsoleHandler {

    public async Run(contex: ModeContex, content: string) {
        switch (content) {
            case ConsoleMode.CreateRobot:
                Log.Console("CreateRobot args error!");
                break;
            default:
                // console.log(`CreateRobotConsoleHandler.Run`);
                // console.log(content);
                break;
        }
        contex.Parent.RemoveComponent<ModeContex>(ModeContex);
        await ETTask.CompletedTask;
    }

}